package com.suke.util;

import com.suke.domain.Emp;
import com.suke.domain.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.annotation.Resource;

/**
 * @author java43.熊佳
 * @date 2020/8/20 9:49
 * @Description
 */
@FeignClient(name = "HelloServer")
public interface EmpFeginClient {

    @RequestMapping(value="ec/emp/{empno}",method= RequestMethod.GET)
    public Result findEmpByEmpno(@PathVariable("empno") Integer empno);

    @RequestMapping(value="ec/emp/add",consumes= {"application/json"},method=RequestMethod.POST)
    public void addEmp(@RequestBody Emp emp);

    @RequestMapping(value="/sayHello/{word}",method= RequestMethod.GET)
    public String sayHello(@PathVariable("word") String word);

}

